/*
 * @Author: szx
 * @Date: 2022-06-06 11:59:24
 * @LastEditTime: 2022-06-06 17:04:06
 * @Description:
 * @FilePath: \leetcode\面试题\16\07\07.js
 */
var maximum = function (a, b) {
    // 取出a-b的符号位，如果是1，那么就说明a大
    let k = (a - b) >>> 31;
    // // 再考虑 a b 异号的情况，此时无脑选是正号的数字
    // let aSign = a >>> 31,
    //     bSign = b >>> 31;
    // // diff = 0 时同号，diff = 1 时异号
    // let diff = aSign ^ bSign;
    // // 在异号，即 diff = 1 时，使之前算出的 k 无效，只考虑两个数字的正负关系
    // k = (k & (diff ^ 1)) | (bSign & diff);
    return a * k + b * ~k;
};
